package com.ls.demo.bean;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author liShan
 * @date 2019/9/4 14:37
 */
@Getter
@Setter
@ToString
public class RoomAirConditionerInfo extends BaseInfo {

    private Long airId;
    private Long roomId;
    /**
     * 空调冷热模式（0b00=制冷；0b01=制热；0b10=换气；0b11=除湿）
     */
    private short mode;
    /**
     * 空调风机状态（0b00=停；0b01=低；0b10=中；0b11=高。）
     */
    private short fans;
    /**
     * 当前房间空调测试温度
     */
    private short testTemp;
    /**
     * 当前房间空调设定温度
     */
    private short preTemp;
    /**
     * 触发源
     */
    private short touchSource;
    /**
     * 触发面板号
     */
    private short touchPanel;


    public RoomAirConditionerInfo() {
    }

    private RoomAirConditionerInfo(Builder builder) {
        super(builder);
        this.airId = builder.airId;
        this.roomId = builder.roomId;
        this.mode = builder.mode;
        this.fans = builder.fans;
        this.testTemp = builder.testTemp;
        this.preTemp = builder.preTemp;
        this.touchSource = builder.touchSource;
        this.touchPanel = builder.touchPanel;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder extends BaseBuilder<Builder>{

        private Long airId;
        private Long roomId;
        private short mode;
        private short fans;
        private short testTemp;
        private short preTemp;
        private short touchSource;
        private short touchPanel;

        @Override
        Builder self() {
            return this;
        }

        public Builder airId(Long airId){
            this.airId = airId;
            return this;
        }

        public Builder roomId(Long roomId){
            this.roomId = roomId;
            return this;
        }

        public Builder mode(short mode){
            this.mode = mode;
            return this;
        }

        public Builder fans(short fans){
            this.fans = fans;
            return this;
        }

        public Builder testTemp(short testTemp){
            this.testTemp = testTemp;
            return this;
        }

        public Builder preTemp(short preTemp){
            this.preTemp = preTemp;
            return this;
        }

        public Builder touchSource(short touchSource){
            this.touchSource = touchSource;
            return this;
        }

        public Builder touchPanel(short touchPanel){
            this.touchPanel = touchPanel;
            return this;
        }

        public RoomAirConditionerInfo build() {
            return new RoomAirConditionerInfo(this);
        }


    }


}
